package com.wn.portal.feign.fallback;

import com.wn.portal.feign.MemberFeignClient;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.stereotype.Component;

/**
 * @author yellow Docter
 * @date 2022 -08-24
 * @desc
 *  把所有的 MemberFeignClient 中的方法都进行重写
 *  如果远程调用失败, MemberFeignFallback调用重写的方法就可以
 */
@Component
public class MemberFeignFallback implements MemberFeignClient {

    @Override
    public String findMemberById(String mid) {
        return "服务降级..." + mid;
    }

    @Override
    public String findMemberTimeOut(Integer mid) {
        return "服务降级..." + mid;
    }
}
